<!--
 * @description  : 许可核查-查询条件
 * @descriptionDetail: 许可核查-查询条件
 * @copyright    : 浙江烟草
 * @author       : sy
 * @create       : 2022-12-09 14:15:18
-->
<template>
  <view class="page">
    <view class="cearch_title">
      查询条件
    </view>
    <u-form :model="queryForm" style="padding: 80rpx 32rpx 160rpx 32rpx" ref="uForm">
      <u-form-item label="流程名称" :label-position="labelPosition">
        <u-input placeholder="请输入流程名称" v-model="queryForm.processName" />
      </u-form-item>
      <u-form-item
        label="受理开始日期"
        :label-position="labelPosition"
        right-icon="arrow-right"
        prop="beginTime"
        ref="startChangeRef"
      >
        <u-input :disabled="true" placeholder="请选择日期" v-model="queryForm.beginTime" @click="timeChoice('beginTime')" />
      </u-form-item>
      <u-form-item
        label="受理结束日期"
        :label-position="labelPosition"
        right-icon="arrow-right"
        prop="endTime"
        ref="endChangeRef"
      >
        <u-input :disabled="true" placeholder="请选择日期" v-model="queryForm.endTime" @click="timeChoice('endTime')" />
      </u-form-item>
    </u-form>
    <view class="submit-btns btn-other-cls">
      <u-button plain class="u-btn" type="primary" @click="resetForm">
        重置
      </u-button>
      <u-button class="u-btn" type="primary" @click="confirmBack">
        确定
      </u-button>
    </view>
  </view>
</template>

<script> 
export default {
  components: { 
  },
  props:{
    params:{
      type: Object,
      default:() => {},
    },  
  },
  data() {
    return {
      labelPosition: 'top',
      queryForm:{
        endTime:'',
        beginTime:'',
        processName:'',
      },
    };
  }, 
  created(){
    this.queryForm = this.params;
  },
  methods: {
    resetForm(){
      this.queryForm = {
        endTime:'',
        beginTime:'',
        processName:'',
      };
      this.$emit("selectChange",this.queryForm);
    },
    confirmBack(){
      this.$emit("selectChange",this.queryForm);
    },
    timeChoice(type){
      this.$emit("choiceTime",type);
    },
  },
};
</script>

<style lang="scss" scoped>
.page{
	padding: 0;
}
.cearch_title{
  background-color: #F3F4F5;
  width: 100%;
  height: 82rpx;
  font-size: 32rpx;
  font-weight: 600;
  padding: 22rpx 0 21rpx 32rpx;
  z-index: 999;
  position: fixed;
}
.content{
  width: 89%;
  margin: auto;
  padding-top: 76rpx;
  .query-btn{
    position: fixed;
    width: 95%;
    bottom: var(--window-bottom,0);
  }
}
.nav-right-icon{
	margin-right: 30rpx;
	font-size: .8rem;
	color: $u-type-primary;
}
</style>

